-
-
Notifications
You must be signed in to change notification settings - Fork 421
Fix object.__ArrayCast error message generation so it works with CTFE #2531
Conversation
Thanks for your pull request and interest in making D better, @JinShil! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2531" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
|
Its a compiler intrinsic most of the time, I've no idea why or how its part of druntime. |
https://github.com/dlang/druntime/blob/master/src/rt/alloca.d I guess inline assembly doesn’t work at compile time. |
See Line 47 in fbc76f7
It's a magic function, given special treatment by the compiler. It is unlike any other and requires compiler assistance to work properly. |
Test suite is printing something like this in DMD...
It seems to work fine at run.dlang.org, though: https://run.dlang.io/is/5a6tje How do I get it to render as a normal string? Beware, we are already casting an array, when we're in this function, so I don't think |
I’ve seen the same thing with failing static asserts |
Yep, looks like CTFE string rendering has a problem: https://run.dlang.io/ (Sigh, I guess I need to figure out how to fix that too). |
Regression? |
No, it appears to have been that way since ancient times. I may address it in a new PR, if it ends up blocking the DMD PR. I think this is ready to go, but I think the DMD side requires some more work. At least it will allow me to continue with the DMD PR. If additional fixes are needed, I can submit them in followup PRs. |
This is a followup to #2264
It is intended to resolve an error currently being encountered on the DMD side in dlang/dmd#9516